import React from 'react';
import Not from '../Notfound';
import ProMan from '../ProMan';
import ExpMan from '../ExpMan';
import ConMan from '../ConMan';
import OrdMan from '../OrdMan';
import TalMan from '../TalMan';
import Shou from '../Shou';
import { Route, Switch, Redirect } from 'react-router-dom'
const Home = props => {
    let { match: { path } } = props
    return (
        <div>
            <Switch>
                <Route path={`${path}/shou`} children={router => <Shou {...router} />} />
                <Route path={`${path}/proman`} children={router => <ProMan {...router} />} />
                <Route path={`${path}/expman`} children={router => <ExpMan {...router} />} />
                <Route path={`${path}/conman`} children={router => <ConMan {...router} />} />
                <Route path={`${path}/ordman`} children={router => <OrdMan {...router} />} />
                <Route path={`${path}/talman`} children={router => <TalMan {...router} />} />
                <Redirect exact from={path} to={`${path}/shou`} />
                <Route component={Not} />
            </Switch>
        </div>
    );
}

export default Home;
